﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using DevExpress.Xpo;
using DevExpress.Xpo.DB;
using DevExpress.Xpo.Helpers;

namespace KamLib
{
    //public static class XpoHelper
    //{

    //    public static IDbConnection GetConnection(this Session db)
    //    {
    //        if (db == null) return null;

    //        if (db.Connection != null)
    //            return db.Connection;

    //        var dl = db.DataLayer as BaseDataLayer;
    //        if (dl == null) return null;
    //        var cp = dl.ConnectionProvider as ConnectionProviderSql;
    //        if (cp == null) return null;

    //        return cp.Connection;
    //    }

    //}

}
